﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;
using System.Runtime.Serialization;

namespace Barbar.Colonization.Model.RuleSets {
  [XmlType(TypeName = "UnitType", Namespace = Constants.XmlRootNamespace)]
  public class XmlUnitType : XmlEntity, IUnitType, IRulesetDeserialization {
    private int m_CargoSlots;
    private int m_BaseAttackStrength;
    private bool m_IsCombatUnit;
    private XmlTerrainTypeRef m_TerrainTypeRef;

    public int CargoSlots {
      get { return m_CargoSlots; }
      set { m_CargoSlots = value; }
    }

    public int BaseAttackStrength {
      get { return m_BaseAttackStrength; }
      set { m_BaseAttackStrength = value; }
    }

    public bool IsCombatUnit {
      get { return m_IsCombatUnit; }
      set { m_IsCombatUnit = value; }
    }

    public XmlTerrainTypeRef TerrainTypeRef {
      get { return m_TerrainTypeRef; }
      set { m_TerrainTypeRef = value; }
    }

    #region IUnitType Members

    int IUnitType.CargoSlots {
      get { return m_CargoSlots; }
    }

    int IUnitType.BaseAttackStrength {
      get { return m_BaseAttackStrength; }
    }

    bool IUnitType.IsCombatUnit {
      get { return m_IsCombatUnit; }
    }

    ITerrainType IUnitType.TerrainType {
      get { throw new NotImplementedException(); }
    }

    Unit IUnitType.CreateUnit() {
      throw new NotImplementedException();
    }

    #endregion

    #region IRulesetDeserialization Members

    void IRulesetDeserialization.OnDeserialization(XmlRuleSet ruleSet) {
      
    }

    #endregion
  }
}
